using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using  RFCard;
using JHVideo;
using Weight.Base;

namespace DeviceManager
{
    interface IDevManager
    {
        /// <summary>
        /// 初始化设备
        /// </summary>
        /// <returns></returns>
        ResultEntity init();

        /// <summary>
        /// 打开设备
        /// </summary>
        /// <returns></returns>
        ResultEntity<DevState> Open();

        /// <summary>
        /// 获取一卡卡号
        /// </summary>
        /// <returns></returns>
        ResultEntity<ResultValEntity> GetCardNo(CardType cardType, int index);
  

        /// <summary>
        /// 读去卡片的内容
        /// </summary>
        /// <param name="index">卡片集合索引</param>
        /// <param name="entity"></param>
        /// <returns></returns>
        ResultEntity<ResultValEntity> ReadCard(CardType cardType,int index,ReadParamEntity entity);



        /// <summary>
        /// 写数据到卡片
        /// </summary>
        /// <param name="index">设备索引</param>
        /// <param name="entity">控制参数</param>
        /// <returns></returns>
        ResultEntity WriteCard(CardType cardType, int index,WriteParamEntity entity);


        /// <summary>
        /// 预览监控
        /// </summary>
        ResultEntity PlayVideo(List<ChannelEntity> channels);

       /// <summary>
       /// 显示消息到大屏
       /// </summary>
       /// <param name="index">设备索引</param>
       /// <param name="content">显示内容</param>
       /// <returns></returns>
        ResultEntity ShowMsg(int index,string content);

        /// <summary>
        /// 抓拍图片
        /// </summary>
        ResultEntity CaptureImg(CaptureParamEntity entity);


        /// <summary>
        ///停止预览
        /// </summary>
        ResultEntity StopPlayVideo();

        /// <summary>
        /// 关闭设备
        /// </summary>
        /// <returns></returns>
        ResultEntity CloseDevice();

        /// <summary>
        /// 添加日志
        /// </summary>
        /// <param name="msg"></param>
        void addLog(string msg);

    }
}


